#include <iostream>
#include<ctime>
#include "AvlTree.h"
using namespace std;

// Test program
int main( )
{
    time_t begin,end;
    double ret;
    
    int i;
    int minData;
    int maxData;
    cout<<"Enter mindata k1 : "; //输入要求：1<=k1<k2<=20
    cin>>minData;
    cout<<"Enter maxdata k2 : ";
    cin>>maxData;

    AvlTree<int> t;
    //将1-20排列成一颗AVLTree
    for( i = 1; i != 10001; i ++ )
        t.insert( i );

    begin=clock();
    t.PrintRange(t,minData,maxData);
    end=clock();
    ret=double(end-begin)/CLOCKS_PER_SEC*1000;
    cout<<endl;
    cout<<"runtime(n=10000): "<<ret<<"ms"<<endl;


}